#include "BB.h"
#include <iostream>
using namespace std;

int BB::c = 10;

BB::BB(){
        a = 0;
        b = 0;
}

BB::BB(int a, int b){ //---->  Test (Test *this, int a, int b)
        this->a = a;
        this->b = b;
}

BB::~BB()
{
}

int BB::getC(){
        return c;
}

void BB::addC(){
        c = c + 1;
}

void BB::print(){
        cout<<"a = "<<this->a<<" b = "<<this->b<<endl;
}

//这个地方的const修饰的是this指针和所指向的内存空间都不能修改
//参考面向对象模型 
void BB::OpVar(int  a, int b) const{ //=====> void OpVar(const BB *this, int a, int b)
        a = 100;
        //this->b = 200; //报错 不能被修改
        cout<<"a = "<<this->a<<" b = "<<this->b<<endl;
}